1. Field of the Invention
The present invention relates generally to the recording of data onto optical discs, and more particularly to a method for the efficient transfer of data from source to destination in the process of recording data to an optical media.
2. Description of the Related Art
Optical disc storage of data offers relatively high capacity data storage (e.g., approximately 640 Megabytes) on a relatively small and inexpensive optical disc. Optical disc recording commonly involves recording (sometimes referred to as xe2x80x9cburningxe2x80x9d) audio tracks or data files on one or more spiral tracks on an optical disc, which can typically hold between 1 and 99 tracks. The high capacity of optical discs for data storage represents a tremendous advancement over prior art data storage such as the floppy disk which has a capacity of approximately 1.4 Megabytes. Conceivably, the trend will continue and optical discs will offer continually increasing storage capacities on similar sized or even smaller optical discs.
The process of burning data to an optical disc typically involves several data processing operations between the selection of data files to be recorded and the recording of those files on an optical disc. Selected data files are located, examined, and sequenced in a recording order. A database of the selected data files is generated containing the exact file locations, track numbers, file size, data mode, and other attribute information necessary for identifying and locating a data file at its source, designating and assigning files that will be sent to system cache memory in preparation for the recording operation, generating a writing order in which the data files are recorded to the destination optical media, designating destination locations, and reading the files and writing the files to the destination optical media. Once the database is generated and stored, it is processed to create lists of source data structures (e.g., file name, directory, path, root, etc.) and to send the designated files to system cache.
Once the database for the selected files has been generated, stored, and processed, portions of the database are typically sent to the CD recording engine for further processing. The prior art method unpacks a list of source data structures generated by the database and sends the source data structures through an interface to the CD recording engine where the individual structures are repacked into another list which is then sent to the track writer. The track writer, which is a component of the CD recording engine, processes the repacked list to read each file from the source or system cache and write it to a CD.
As is known, the operation of burning the selected files to a CD includes reading the source files into a system memory buffer from the source, and from system cache for those files that have been cached. Data files are read a sector at a time into the buffer. The current standard sets the sector length on a CD optical disc at 2352 bytes, and the source data written into those sectors is manipulated within the parameters of that standard. By way of example, source data (e.g., the data files selected for recording to a CD or other optical media) can be of data mode 1 or data mode 2, and data mode 2 has form 1 and form 2 variations. While data mode 1 has 2048 bytes of user data that can be written directly into a designated space in a physical sector in system memory buffer and on the destination CD, data mode 2 (both form 1 and form 2) has a subheader that must be written in the physical space before the user data. Some information in the subheader is dependent on the data in the user data portion of the sector. When the user data is read into the system memory buffer in the prior art, the track writer reads the data from the source into the system memory buffer. Because the track writer must first read the sector of data before it can determine what information will go into the subheader, the prior art track writer reads a sector of mode 2 data into the system memory buffer. Then, when the track writer is able to write the subheader, having the information from the sector just read into memory, the track writer moves the entire sector of user data one byte at a time and then writes the subheader in the space created before the user data it just moved. This process is repeated for each sector until the buffer is full. Once the buffer is full, the data is written to the destination CD or other optical media by the optical CD recording circuitry, and then the entire process is repeated until all of the selected files have been recorded.
It should be appreciated that the prior art process generates multiple lists of data records for each data file selected for burning to a CD optical disc, and utilizes considerable system resources in the processes of generating, storing, processing, and transferring the lists and structures between various devices and routines. As is known, each time the list or a variation is generated, the system dedicates and uses system resources (e.g., memory) in the evaluation of the data records and the generation of the lists. The inefficiency of the process is compounded by the fact that the processing accomplished by the database to generate the structures that are sent to the CD recording engine is then duplicated by the CD recording engine and track writer. Additionally, the reading of mode 2 data into the system memory buffer a sector at a time and then moving that data one byte at a time in order to write a subheader before the data consumes additional resources and time, and is an inefficient use of system resources.
With the ever-increasing capacity of optical discs, and the ever-increasing demand for more efficient and economical utilization of available storage capacity, the conservation of system resources and more efficient processing of data files in preparation for burning to an optical disc, as well as the recording operation, is of paramount concern. By way of example, thousands of data files could be selected for burning to a single CD optical disc with a capacity for 640 Megabytes of data. The prior art would examine each of the selected files and generate a database of those files, prepare multiple lists of information about the selected data files, with some of the lists having identical information contained therein, would unpack source structures and send them through a COM interface only to have them repacked into yet another list, and in the process of recording mode 2 data, would read entire sectors into a buffer and then move those sectors a byte at a time in order to write a subheader immediately preceding the data. Because the system resources could rapidly become overloaded, some of the data might be lost, the writing process could fail altogether, and the system performance itself could degrade or the system could even crash.
In view of the foregoing, there is a need for a method of processing data files in preparation for recording, and then in the recording of the selected files to a CD or other optical media that minimizes drain on system resources while maximizing efficient and economical use of the storage capacity of an optical disc.
Broadly speaking, the present invention fills these needs by providing methods for efficient processing data files selected for recording to an optical disc media, and for the efficient and reliable recording of data files to an optical disc media. The invention provides methods for processing of files that minimizes the generation of lists that catalog location and attribute information about each data file before writing to the optical disc media. The invention further provides for the reading of files selected for recording to an optical disc media by a file system database that has processed the files for recording. It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable media. Several embodiments of the present invention are described below.
In one embodiment, a method for the processing of data files selected to be recorded on an optical disc media is disclosed. The method includes the generating of source data information from a file system database. A number of sectors of data are requested from the file system database, and the file system database reads the requested number of sectors of data into system memory locations of a system memory buffer. The file system database writes a subheader for each sector of data after writing each sector of data into a memory location that is before each sector of data. Once the requested sectors of data have been read into the system memory buffer, the sectors and subheaders are recorded to an optical disc media.
In another embodiment, a method for processing data to be recorded on an optical disc media is disclosed. The method includes the generating of source data information from a file system database. A number of sectors of data are requested from the file system database, and the file system database reads the requested number of sectors one at a time into system memory locations of a system memory buffer. The file system database reads the requested number of sectors one at a time into the system memory locations of a system memory buffer such that each sector (e.g., a first portion which is user data) is read into the system memory buffer with an offset. There is a memory location then before each sector of data that is defined by the offset. The file system database writes a subheader (e.g., a second portion) for each of the requested sectors of data after reading each sector of data. The subheader is written into the memory location defined by the offset before each sector of data. When the requested sectors of data have been read into the system memory buffer, the data and subheaders are recorded to optical disc media.
In still a further embodiment, a computer readable media having program instructions for recording data to an optical disc is disclosed. The computer readable media includes program instructions to generate source data information from a file system database, and for requesting a number of sectors of data from the file system database. The computer readable media has further program instructions to read each of the requested number of sectors one at a time into system memory locations of a system memory buffer, and to write a subheader for each of the requested sectors after each of the sectors is read into the system memory buffer. The subheader is written into a memory location that is before each sector. The computer readable media then has program instructions to record the sectors and subheaders in the system memory buffer to an optical disc media.
One benefit and advantage of the invention is more efficient processing of data files to be recorded on an optical disc media, and a more efficient and reliable recording session. By utilizing the file system database to read data directly into system memory buffer, and to offset the location into where data (e.g., user data) is read, duplication of the processing of data is minimized, and the movement of data within the system memory buffer in order to write a subheader is eliminated. The more efficient allocation and use of system resources in the processing and recording of data files to optical disc media prevents incomplete data transfer, buffer under-run, or system crash. Another benefit of the present invention is that with more efficient processing of data files, the operation proceeds faster and more reliably. This allows a user to select and record large amounts of data to record to an optical disc media and to realize the benefits of the storage capacity of optical disc media without system overload or failure.